package com.karaoke.oksrv.websocket

import com.fasterxml.jackson.annotation.JsonInclude
import com.karaoke.oksrv.websocket.Command
import javax.websocket.Session

/**
 * Created by Administrator on 2017/4/11.
 */

@JsonInclude(JsonInclude.Include.NON_NULL)
open class Message<T>()
{

    constructor(cmd: Command) : this()
    {
        this.cmd = cmd
    }

    var cmd: Command = Command.RoomInit
    var value: T? = null
    var ext: HashMap<String, Any> = HashMap()
}

enum class Command
{
    Heartbeat,
    RoomInit,
    SongPlayed,
    SongStartPlay,
    PublicSongs,
    ScrollTexts,
    CutSong,
    Pause,
    Replay,
    ChangedYB,
    Mute,
    ChangeVol,
    GetPlayList
}

